<?php
header('content-type:text/html;charset=utf-8');
//引入常用函数库
include 'functions.php';

//拿到现在已经有的配置项
$config = include 'config.php';

//调用C函数修改配置项
$config = C($config,'DATABASE_PWD','666');

//将数组转成字符串形式
$configstr = var_export($config,true);
//组合要写入的内容
$str = "<?php\n\r return ".$configstr."\n\r ?>";
//将新的配置项写入到配置文件中
file_put_contents('config.php',$str);

















